package ai.people.core.standard.gather.entity;

import ai.people.netmon.framework.domain.userconfig.entity.UserCollectConfigAccount;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 说明
 *
 * @author zhenglin
 * @since 2022/3/9
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserConfigAccountData {
    /**
     * 用户添加账号信息
     */
    private String account;
    /**
     * 账户链接
     */
    private String accountLink;
    /**
     * 信源类别
     */
    private String infoType;

    /**
     * 采集频次(预留)
     */
    private Integer crawlInterval;

    /**
     * 合作伙伴ID，页面调用时传入 格式 [xx,cc]
     */
    private String partnerId;

    public UserConfigAccountData(UserCollectConfigAccount account){
        this.account = account.getAccount();
        this.accountLink = account.getAccountLink();
        this.infoType = account.getInfoType();
        this.crawlInterval = Integer.parseInt(account.getCrawlInterval());
        this.partnerId = account.getPartnerId();
    }
}
